﻿<%@ Page Language="C#" AutoEventWireup="true"CodeBehind="FIM_PaymentPayInPackMultiRqToPq.aspx.cs" Inherits="KPIS.GERP.GFMS.APP.App_UI.Forms.FIM_PaymentPayInPackMultiRqToPq" %>
<%@ Import Namespace="KPIS.GERP.GFMS.APP.App_UI.Forms" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>แสดงรายการ RQ ไปยัง PQ</title>
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <Telerik:RadCodeBlock runat="server">
            <script src="<%= Page.ResolveUrl("~/js/jquery-1.9.1.js") %>" type="text/javascript"></script>
            <script src="<%= Page.ResolveUrl("~/js/jquery.form.js") %>" type="text/javascript"></script>
            <script src="<%= Page.ResolveUrl("~/js/jquery.MetaData.js") %>" type="text/javascript"></script>
            <script src="<%= Page.ResolveUrl("~/js/jquery.MultiFile.js") %>" type="text/javascript"></script>
            <script src="<%= Page.ResolveUrl("~/js/jquery.blockUI.js") %>" type="text/javascript"></script>
            <link href="<%= Page.ResolveUrl("~/App_UI/CssClass.css") %>" rel="stylesheet" type="text/css" />
            <link href="<%= Page.ResolveUrl("~/App_UI/Images/Buttons/KPIS%20logo.ico") %>" rel="shortcut icon" />
        </Telerik:RadCodeBlock>
        <style type="text/css" >
            .moduleDivSlim1000
            {
	            width: 1000px;
	            background: url('/App_UI/Images/PageViews/ModuleTop1000.jpg') no-repeat;
	            margin-bottom: 15px;
	            padding-top: 5px;
            }
            .moduleDivBottom1000
            {
	            background: url('/App_UI/Images/PageViews/ModuleBottom1000.gif') no-repeat bottom;
	            color: #252f34;
	            padding: 0px 0px 5px 0px;
	            line-height: 16px;
	            font-size: 12px;
            }
            .LinkButtonHeader
            {
	            font-size: small;
	            color: White;
	            text-decoration:none;
            }

            .LinkButtonHeader:hover
            {
	            font-size: small;
	            color: orange;
	            text-decoration:none;
            }

            .LinkButtonHeader:active
            {
	            font-size: small;
	            color: black;
	            text-decoration:none;
            }

            .LinkButtonHeader img
            {
	            border-style: none;
            }
            
            .NotificationLinkButton
            {
	            font-size: normal;
	            color: white;
	            text-decoration:none;
            }

            .NotificationLinkButton:hover
            {
	            font-size: normal;
	            color: black;
	            text-decoration:underline;
            }

            .NotificationLinkButton:active
            {
	            font-size: normal;
	            color: black;
	            text-decoration:none;
            }
            .BgLine
            {
	            background-position: right;
	            background-image: url( '/App_UI/Images/PageViews/BG_Line.png' );
	            background-repeat: repeat-x;
            }
            .disableScrollBar
            {
	            overflow:hidden;
            }

            .RemoveHover:hover{
                font-size:small; 
                color:#ffffff;
                text-shadow: 0 0 5px #ffffff;              
            }
        </style>
    </head>
    <body id="body" runat="server" style="padding: 0px; margin: 0px">
        <form id="form1" style="font-family: 'Tahoma'; font-size: small;" runat="server" enctype="multipart/form-data">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            
            <h2>ผลการบันทึกรายการรอเบิกค้างจ่าย ไปเป็นรายการจ่ายเงิน</h2>
            <hr style="border:none; border-top: solid 1px gray"/>
            <span style="font-weight: bold;">ข้อความ: </span>
            <span style="color:blue; font-weight: bold;">
                <%= FIM_PaymentPayInPackMulti.PaymentSaveResult.MessageShow(Session["PaymentSaveResult"] as 
                System.Collections.Generic.List<FIM_PaymentPayInPackMulti.PaymentSaveResult>) %>
            </span>
            <hr style="border:none; border-top: solid 1px gray"/>
           <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="RadGrid2" runat="server" AutoGenerateColumns="False"
                ShowStatusBar="True" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"
                Width="99%"   Height="350px"
                GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                GroupingSettings-GroupContinuedFormatString=""
                GroupingSettings-GroupContinuesFormatString=""
                GroupingSettings-GroupSplitFormat="" CellSpacing="0" GridLines="None" >
                <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" Width="100%" DataKeyNames="pay_seq" NoMasterRecordsText="< ไม่มีข้อมูล >">
                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                    <RowIndicatorColumn><HeaderStyle Width="20px" /></RowIndicatorColumn>
                    <ExpandCollapseColumn><HeaderStyle Width="20px" /></ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="pay_seq" UniqueName="pay_seq" Visible="False" />
                        <telerik:GridTemplateColumn AllowFiltering="False">
                            <ItemTemplate>
                                <asp:Image runat="server" ImageUrl="~/App_UI/Images/Buttons/Update.gif" Visible='<%# !string.IsNullOrEmpty(Eval("ref_no_payment") as string) %>'/>
                                <asp:Image runat="server" ImageUrl="~/App_UI/Images/Buttons/warning.png" Visible='<%# string.IsNullOrEmpty(Eval("ref_no_payment") as string) %>'/>
                            </ItemTemplate>
                            <HeaderStyle Width="40px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" HeaderText="เลขที่ขอเบิก">
                            <ItemTemplate>
                                <asp:Label runat="server" Font-Bold="true" Text='<%# Eval("ref_no_money_request") %>'></asp:Label> 
                            </ItemTemplate>
                            <HeaderStyle Width="90px" />
                        </telerik:GridTemplateColumn> 
                        <telerik:GridBoundColumn DataField="ref_no_money_request" HeaderText="เลขที่ขอเบิก" Visible="False"
                            HeaderStyle-Width="90px"
                            UniqueName="ref_no_money_request" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                            <HeaderStyle Width="90px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" HeaderText="เลขที่จ่าย">
                            <ItemTemplate>
                                <asp:Label runat="server" Font-Bold="true" ForeColor="Blue" 
                                    Text='<%# string.IsNullOrEmpty(Eval("ref_no_payment") as string) ? "(ไม่สำเร็จ)": Eval("ref_no_payment") %>'></asp:Label> 
                            </ItemTemplate>
                            <HeaderStyle Width="90px" />
                        </telerik:GridTemplateColumn> 
                        <telerik:GridBoundColumn DataField="ref_no" HeaderText="เลขที่จ่าย" Visible="False"
                            HeaderStyle-Width="100px" 
                            UniqueName="ref_no" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                            <HeaderStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="created_when" HeaderText="วันที่สร้างรายการจ่าย" Visible="False"
                            HeaderStyle-Width="120px"
                            UniqueName="created_when" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False"
                            DataFormatString="{0:d/MM/yyyy H:mm}">
                            <HeaderStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="event_name" HeaderText="เรื่อง" Visible="False"
                            HeaderStyle-Width="100px"
                            UniqueName="event_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                            <HeaderStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="payable_name" HeaderText="ชื่อผู้รับเงิน" Visible="False"
                            HeaderStyle-Width="130px"
                            UniqueName="payable_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                            <HeaderStyle Width="130px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="money_req_name" HeaderText="รายละเอียด" Visible="True"
                            UniqueName="money_req_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="method_name" HeaderText="วิธีการจ่าย" Visible="False"
                            HeaderStyle-Width="70px"
                            UniqueName="method_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                            <HeaderStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="amount" HeaderText="จำนวนเงิน(บาท)" Visible="False"
                            HeaderStyle-Width="100px"
                            UniqueName="amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                            CurrentFilterFunction="Contains" ShowFilterIcon="False"
                            DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right">
                            <HeaderStyle Width="100px" />
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" HeaderText="จำนวนเงิน(บาท)">
                            <ItemTemplate>
                                <div style="text-align: right">
                                <asp:Literal runat="server" 
                                    Text='<%# Eval("amount") == null ? "-" :(Eval("amount") as double? ?? 0).ToString("#,##0.00") %>'></asp:Literal>
                                </div>
                            </ItemTemplate>
                            <HeaderStyle Width="100px" />
                        </telerik:GridTemplateColumn >
                        <telerik:GridTemplateColumn AllowFiltering="True" HeaderText="หมายเหตุ">
                            <ItemTemplate>
                                <asp:Label runat="server" 
                                           ForeColor='<%# (Eval("pay_seq") as int?).HasValue 
                                                              ? System.Drawing.Color.Green 
                                                              : System.Drawing.Color.Orange %>'
                                           Text='<%# Eval("result_reason") %>' />
                            </ItemTemplate>
                            <HeaderStyle Width="200" />
                        </telerik:GridTemplateColumn> 
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                    <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                        FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                        NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                        PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                </MasterTableView>
                <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                    GroupContinuedFormatString="" GroupContinuesFormatString="" 
                    GroupSplitFormat="" />
                <ClientSettings EnableRowHoverStyle="True" EnablePostBackOnRowClick="false" >
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                </ClientSettings>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>

        </form>
    </body>
</html>
